<?php
/*
       
*/

class Request {
      private static $instance;
      private $parameters;
      
      private function __construct() {
            $this->parameters = Array();
      
            if (!empty($_GET)) {
                  $this->parameters = array_merge($this->parameters,$_GET);
            }
            
            if (!empty($_POST)) {
                  $this->parameters = array_merge($this->parameters,$_POST);
            }
      }
      
      public static function getInstance() {
            if (is_null(self::$instance)) { 
                  self::$instance = new Request();
            }
            return self::$instance;
      }
      
      public function getParameter($name) {
            if (isset($this->parameters[$name])) return $this->parameters[$name];
            else return '';
      }
}
?>
